package cn.yeziji.forum.converter;

import cn.yeziji.forum.entity.ForumShareLinkEntity;
import cn.yeziji.forum.vo.shareLink.ShareLinkVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 分享链接转换器
 *
 * @author gzkemays
 * @since 2022/11/11 5:07 PM
 */
@Mapper
public interface ShareLinkConverter {
  ShareLinkConverter INSTANCE = Mappers.getMapper(ShareLinkConverter.class);

  /**
   * entity 转前端视图对象
   *
   * @param entity 指定pojo
   * @return ShareLinkVO
   */
  ShareLinkVO entityConvertToVO(ForumShareLinkEntity entity);

  List<ShareLinkVO> entitiesConvertToVOs(List<ForumShareLinkEntity> entities);
}
